#include<bits/stdc++.h>
#define pii pair<int,int>
#define x first
#define y second
#define pb push_back
using namespace std;
const int N = 1e5 + 7;
multiset<int>st1,st2;
int n;
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(nullptr);
    cout.tie(nullptr);
    cin>>n;
    for(int i=1;i<=n;++i){
        int x;cin>>x;
        st1.insert(x);
        st2.insert(x);
    }
    while(!st1.empty()){
        int x = *st1.begin();
        auto p = st2.upper_bound(x);
        if(p!=st2.end()){
            int tmp = *p;
            st1.erase(st1.find(x));
            if(st2.find(x)!=st2.end()) st2.erase(st2.find(x));
            st2.erase(st2.find(tmp));
        }
        else break;
    }
    cout<<st1.size();
    return 0;
}
